let app=new Vue({
    el:'#app',
    data:{
        exam: JSON.parse(sessionStorage.getItem('examPaperView2')),            // 存储试卷数据
        paperQuestions: [],  // 存储试题数据
        singleCount: 0,    // 记录单选题数量
        multipleCount: 0,  // 记录多选题数量
        judgeCount: 0     // 记录判断题数量    
    },
    created(){
        // 根据试卷信息的试题编号查询试题信息
        $.ajax({
            url: 'http://localhost:8080/paperQuestion/selectById',
            type: 'post',
            data: { questions: this.exam.questions },
            success: function (vo) {
                if (vo.code == 200) {
                    app.paperQuestions = vo.data;
                    app.singleCount = vo.singleCount;
                    app.multipleCount = vo.multipleCount;
                    app.judgeCount = vo.judgeCount;
                    // console.log(app.exam);
                    // console.log(app.paperQuestions);
                    // console.log(app.singleCount);
                    // console.log(app.multipleCount);
                    // console.log(app.judgeCount);

                }
            }
        });
    }
});